package com.basic.business.upDate.service.impl;

import com.basic.business.upDate.domain.TGoodsUpDate;
import com.basic.business.upDate.mapper.TGoodsUpDateMapper;
import com.basic.business.upDate.service.ITGoodsUpDateService;
import com.basic.common.core.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * 商品上新日期管理Service业务层处理
 *
 * @author zhaoxy_jn@163.com
 */
@Service
public class TGoodsUpDateServiceImpl extends BaseServiceImpl<TGoodsUpDateMapper, TGoodsUpDate> implements ITGoodsUpDateService {

    @Resource
    private TGoodsUpDateMapper tGoodsUpDateMapper;

    @Override
    public void batchInsertOrUpdate(List<TGoodsUpDate> list) {
        tGoodsUpDateMapper.batchInsertOrUpdate(list);
    }

    @Override
    public int updateDateByGoodsId(Date upNewDate, String goodsId) {
        return tGoodsUpDateMapper.updateDateByGoodsId(upNewDate, goodsId);
    }
}
